package com
{
	import com.controllers.GameController;
	import com.core.Game;
	import com.datas.GameData;
	import com.views.GameView;

	public class LLKGame extends Game
	{
		
		public var _view:GameView;
		public var _data:GameData
		public var _controller:GameController;
		public function LLKGame()
		{
			super();
		}
		override public function newGame():void{//初始化MVC
			_data = new GameData;
			_view = new GameView
			_controller = new GameController;
			addChild( _view )
		}
		override public function newLevel():void{
			//将引用传进相应的模块  并创建基本对象
			//根据等级数据来确定游戏内容
			var level:int = GameModel.getInstance().level
			_data.initData(level);//传现在数据生成的条件
			_view.initView(_controller);//生成显示容器
			_controller.initController(_view);
		}
		override public function runGame():void{
			_view.updateView();
		}
		override public function runGameSecond():void{
			_view.updateViewSecond()
		}
		override public function startGame():void{//生成相应的数据 根据数据生成相应的显示
			_data.createData();
			_view.createView();
		}
		
	}
}